%{--无新增按钮--}%
<div class="row" id="housesTemplate3">
    <div class="hpanel hyellow">
        <div class="panel-heading">
            <div class="panel-tools">
                    <g:link class="btn btn-info btn-xs" controller="vehicle" action="create"
                            params="[opportunity: this.opportunity?.id]"><i class="fa fa-plus"></i>新增</g:link>
                <a class="showhide"><i class="fa fa-chevron-up"></i></a>
            </div>
            车辆基础信息
        </div>

        <div class="panel-body no-padding">
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover text-center">
                    <thead>
                    <tr>
                        <g:sortableColumn property="externalId" title="车辆品牌"></g:sortableColumn>
                        <g:sortableColumn property="propertySerialNumber" title="车辆类型"></g:sortableColumn>
                        <g:sortableColumn property="city" title="车辆名称"></g:sortableColumn>
                        <g:sortableColumn property="district" title="出厂年份"></g:sortableColumn>
                        <g:sortableColumn property="district" title="购车合同号"></g:sortableColumn>
                        <g:sortableColumn property="projectName" title="购买用途"></g:sortableColumn>
                        <g:sortableColumn property="address" title="是否分期"></g:sortableColumn>
                        <g:sortableColumn property="orientation" title="买入日期"></g:sortableColumn>
                        <g:sortableColumn property="area" title="车辆发动机号"></g:sortableColumn>
                        <g:sortableColumn property="building" title="车架号"></g:sortableColumn>
                        <g:sortableColumn property="unit" title="车牌号"></g:sortableColumn>
                        <g:sortableColumn property="roomNumber" title="登记人"></g:sortableColumn>
                        <g:sortableColumn property="floor" title="登记单位"></g:sortableColumn>
                        <g:sortableColumn property="totalFloor" title="统计截止日期"></g:sortableColumn>
                        <g:sortableColumn property="assetType" title="更新日期"></g:sortableColumn>
                        %{--<g:sortableColumn property="cooperation" title="操作"></g:sortableColumn>--}%
                    </tr>
                    </thead>
                    <tbody>
                    <g:each in="${this.vehicles}">
                        <g:if test="${it&&it?.type&&it?.type?.name=='车'}">
                        <tr>
                            <td class="housesExternalId">
                                <g:link controller="house" action="showCar"
                                        id="${it.id}">${it.vehicleBrand}</g:link>
                            </td>
                            <td>
                                ${it.subtype?.name}
                            </td>
                            <td>${it.projectName}
                            </td>
                            <td>
                                <g:formatDate format="yyyy" date="${it.buildTime}"/>
                            </td>
                            <td>
                                ${it.propertySerialNumber}
                            </td>
                            <td>
                                ${it.purpose}
                            </td>
                            <td>
                                ${it.purchaseState}
                            </td>
                            <td>
                                ${it.purchaseDate}
                            </td>
                            <td>
                                ${it.engineCode}
                            </td>
                            <td>
                                ${it.carframeCode}
                            </td>
                            <td>
                                ${it.vehicleLicense}
                            </td>
                            <td>
                                ${it.registerUser}
                            </td>
                            <td>
                                ${it.registerAccount}
                            </td>
                            <td>
                                ${it.endTime}
                            </td>
                            <td>
                                ${it.modifiedDate}
                            </td>
                            %{--<td>
                                <g:form resource="${it}" method="DELETE">
                                    <button class="deleteBtn btn btn-danger btn-xs btn-outline"
                                            type="button">删除</button>
                                </g:form>
                            </td>--}%
                        </tr>
                        </g:if>
                    </g:each>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
